package org.jeecg.modules.rental.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.rental.entity.RentalAccountPackage;
import org.jeecg.modules.rental.req.BindPackageReq;

import java.util.List;

/**
 * @Description: 账户(客户)套餐
 * @Author: sean
 * @Date:   2024-06-17
 * @Version: V1.0
 */
public interface IRentalAccountPackageService extends IService<RentalAccountPackage> {

    /**
     * 获取有效套餐
     * @return
     */
    List<RentalAccountPackage> effectivePackages();

    /**
     * 获取行程记录
     * @param page
     * @return
     */
    Page<RentalAccountPackage> historyPackages(Page page);

    IPage<RentalAccountPackage> selectJoinPage(Page page, Wrapper wrapper);


    Result<String> verifyPackage(String accountPackageId);

//    Result<Boolean> refund(AccountPackageReq req) throws Exception;

    RentalAccountPackage curPkgByCarId(Long carId);

    RentalAccountPackage getCurrentUserAccountPackage();

    Result bindEBike(BindPackageReq req);
}
